package com.bbkb.quartz.config;

import com.bbkb.portal.interceptor.AuthorityInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import java.util.List;

/**
 * 注册拦截器
 * Created by SYSTEM on 2017/8/16.
 */
@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //权限拦截
//        registry.addInterceptor(new AuthorityInterceptor()).addPathPatterns("/admin/**");
    }

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
        // 统一权限
//        argumentResolvers.add(new UserInfoHandlerMethodArgumentResolver());
    }

}  